/* 主样式文件 - 通用物料系统美化版 */

/* 全局样式 */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --transition: all 0.3s ease;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", 微软雅黑, Tahoma, Arial, sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-700);
  line-height: 1.5;
}

/* 增强导航栏样式 */
.navbar {
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(209, 213, 219, 0.3);
  transition: var(--transition);
}

.navbar-brand {
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.025em;
}

/* 侧边栏增强样式 */
.sidebar {
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
  border-right: 1px solid var(--gray-200);
  transition: var(--transition);
}

.sidebar.collapsed {
  width: 70px;
}

.menu-item {
  position: relative;
  transition: var(--transition);
  border-radius: 0.5rem;
}

.menu-item:hover {
  background-color: rgba(59, 130, 246, 0.08);
  transform: translateX(4px);
}

.menu-item.active {
  background-color: rgba(59, 130, 246, 0.12);
  font-weight: 500;
}

.menu-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background-color: var(--primary);
  border-radius: 0 3px 3px 0;
}

.menu-item.active i {
  color: var(--primary);
}

.sidebar-item span {
  transition: opacity 0.3s, transform 0.3s;
}

/* 卡片样式增强 */
.card {
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* 统计卡片美化 */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  z-index: 1;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
  z-index: -1;
}

/* 表格样式增强 */
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

table th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

table td {
  border-bottom: 1px solid var(--gray-200);
}

table tr:hover {
  background-color: rgba(59, 130, 246, 0.04);
}

/* 按钮样式增强 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-50);
  color: var(--gray-800);
  border-color: var(--gray-400);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

/* 输入框样式增强 */
.input {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.input-icon ~ .input {
  padding-left: 2.5rem;
}

/* 文件预览窗口增强 */
#filePreviewModal {
  backdrop-filter: blur(5px);
}

#filePreviewModal .modal-content {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 美化滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
  transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

/* 用户信息栏目样式 */
.user-info {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.user-info:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 0.75rem;
}

/* 文件图标美化 */
.file-icon {
  position: relative;
  font-size: 1.25rem;
  margin-right: 0.75rem;
}

/* 美化徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* 文件上传区域美化 */
.file-drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  background-color: var(--gray-50);
  cursor: pointer;
}

.file-drop-zone:hover {
  border-color: var(--primary);
  background-color: rgba(59, 130, 246, 0.05);
}

.file-drop-zone.drag-over {
  border-color: var(--primary);
  background-color: rgba(59, 130, 246, 0.1);
  transform: scale(1.01);
}

/* 美化工具提示 */
.tooltip {
  position: absolute;
  background-color: var(--gray-800);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  z-index: 50;
  max-width: 200px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent var(--gray-800);
} 